package com.mayikt.zuul.handler;

import com.netflix.zuul.context.RequestContext;

public class BaseHandler {
    public GatewayHandler nextGatewayHandler;

    public void setNextHandler(GatewayHandler gatewayHandler) {
        this.nextGatewayHandler = gatewayHandler;
    }

    public void resultError(RequestContext ctx, String errorMsg) {
        ctx.setResponseStatusCode(401);
        ctx.setSendZuulResponse(false);
        ctx.setResponseBody(errorMsg);
    }
}
